
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module main</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>main</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:///C:/python27/15/main.py">c:\python27\15\main.py</a></font></td></tr></table>
    <p><tt>from&nbsp;time&nbsp;import&nbsp;clock</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="math.html">math</a><br>
<a href="numpy.html">numpy</a><br>
</td><td width="25%" valign=top><a href="matplotlib.pyplot.html">matplotlib.pyplot</a><br>
<a href="random.html">random</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
<a href="time.html">time</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-calculo"><strong>calculo</strong></a>(algoritmo, tamanho)</dt><dd><tt>Funcao&nbsp;que&nbsp;cria&nbsp;as&nbsp;listas&nbsp;de&nbsp;valores&nbsp;e&nbsp;calculos&nbsp;do&nbsp;tempos&nbsp;da&nbsp;execucao&nbsp;dos&nbsp;algoritmos<br>
&nbsp;<br>
Parametros&nbsp;de&nbsp;entrada&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;algoritmo&nbsp;-&gt;&nbsp;Opcao&nbsp;escolhida<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tamanho&nbsp;-&gt;&nbsp;tamaanho&nbsp;maximpo&nbsp;para&nbsp;o&nbsp;array&nbsp;<br>
&nbsp;<br>
Parametros&nbsp;de&nbsp;retorno&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeList&nbsp;-&gt;&nbsp;lista&nbsp;de&nbsp;tempos&nbsp;da&nbsp;execucao&nbsp;do&nbsp;algoritmo<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rangeFor1&nbsp;-&gt;&nbsp;lista&nbsp;de&nbsp;n&nbsp;de&nbsp;elementos</tt></dd></dl>
 <dl><dt><a name="-calculoDesvio"><strong>calculoDesvio</strong></a>(media, timeListTemp)</dt><dd><tt>Funcao&nbsp;que&nbsp;calcula&nbsp;o&nbsp;Desvio&nbsp;Padrao&nbsp;<br>
&nbsp;<br>
Parametros&nbsp;de&nbsp;entrada&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;media&nbsp;-&gt;&nbsp;Media&nbsp;dos&nbsp;valores&nbsp;calculados&nbsp;n&nbsp;vezes&nbsp;para&nbsp;o&nbsp;mesmo&nbsp;array<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeListTemp&nbsp;-&gt;&nbsp;Array&nbsp;com&nbsp;os&nbsp;valores&nbsp;calculados&nbsp;n&nbsp;vezes&nbsp;para&nbsp;o&nbsp;mesmo&nbsp;array<br>
&nbsp;<br>
Parametros&nbsp;de&nbsp;retorno&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;desvio&nbsp;-&gt;&nbsp;timeListTemp</tt></dd></dl>
 <dl><dt><a name="-drawGraphic"><strong>drawGraphic</strong></a>(timeList, pteorList, nElement, ntotal)</dt><dd><tt>Funcao&nbsp;que&nbsp;desenha&nbsp;o&nbsp;gafico&nbsp;dos&nbsp;tempos&nbsp;e&nbsp;da&nbsp;previsao&nbsp;teorica&nbsp;do&nbsp;algoritmo&nbsp;desejado&nbsp;&nbsp;<br>
&nbsp;<br>
Parametros&nbsp;de&nbsp;entrada&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;timeList&nbsp;-&gt;&nbsp;Array&nbsp;com&nbsp;os&nbsp;tempos&nbsp;do&nbsp;algoritmo<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pteorList&nbsp;-&gt;&nbsp;Array&nbsp;com&nbsp;os&nbsp;valores&nbsp;da&nbsp;previsao&nbsp;teorica<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nElement&nbsp;-&gt;&nbsp;Total&nbsp;de&nbsp;elementos&nbsp;de&nbsp;cada&nbsp;array&nbsp;de&nbsp;tempos&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ntotal&nbsp;-&gt;&nbsp;valor&nbsp;de&nbsp;vezes&nbsp;incrementado&nbsp;o&nbsp;for&nbsp;de&nbsp;posicoes&nbsp;do&nbsp;array&nbsp;para&nbsp;ordenacao</tt></dd></dl>
 <dl><dt><a name="-drawGraphic2"><strong>drawGraphic2</strong></a>(arryarry, nElement, ntotal)</dt><dd><tt>Funcao&nbsp;que&nbsp;desenha&nbsp;os&nbsp;gaficos&nbsp;dos&nbsp;tempos&nbsp;dos&nbsp;algoritmos&nbsp;todos&nbsp;<br>
&nbsp;<br>
Parametros&nbsp;de&nbsp;entrada&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arryarry&nbsp;-&gt;&nbsp;Array&nbsp;com&nbsp;os&nbsp;array&nbsp;de&nbsp;tempos&nbsp;de&nbsp;cada&nbsp;algoritmo<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nElement&nbsp;-&gt;&nbsp;Total&nbsp;de&nbsp;elementos&nbsp;de&nbsp;cada&nbsp;array&nbsp;de&nbsp;tempos&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ntotal&nbsp;-&gt;&nbsp;valor&nbsp;de&nbsp;vezes&nbsp;incrementado&nbsp;o&nbsp;for&nbsp;de&nbsp;posicoes&nbsp;do&nbsp;array&nbsp;para&nbsp;ordenacao</tt></dd></dl>
 <dl><dt><a name="-verifica"><strong>verifica</strong></a>(algoritmo, tamanho)</dt><dd><tt>Funcao&nbsp;que&nbsp;verifica&nbsp;se&nbsp;e&nbsp;para&nbsp;fazer&nbsp;o&nbsp;calculo&nbsp;de&nbsp;um&nbsp;so&nbsp;algoritmo&nbsp;ou&nbsp;de&nbsp;todos&nbsp;os&nbsp;algoritmos<br>
&nbsp;<br>
Parametros&nbsp;de&nbsp;entrada&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;algoritmo&nbsp;-&gt;&nbsp;Opcao&nbsp;escolhida&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tamanho&nbsp;-&gt;&nbsp;tamaanho&nbsp;maximpo&nbsp;para&nbsp;o&nbsp;array</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>algoritmo</strong> = 10<br>
<strong>flag</strong> = 1<br>
<strong>tamanho</strong> = 350</td></tr></table>
</body></html>